feat(Topology/Connected): local (path-)connectedness of products and pi types#41663
feat(Topology/Connected): local (path-)connectedness of products and pi types#41663korbonits wants to merge 9 commits into
Conversation
… are locally (path-)connected
Welcome new contributor!Thank you for contributing to Mathlib! If you haven't done so already, please review our contribution guidelines, as well as the style guide and naming conventions. In particular, we kindly remind contributors that we have guidelines regarding the use of AI when making pull requests. We use a review queue to manage reviews. If your PR does not appear there, it is probably because it is not successfully building (i.e., it doesn't have a green checkmark), has the If you haven't already done so, please come to https://leanprover.zulipchat.com/, introduce yourself, and mention your new PR. Thank you again for joining our community. |
PR summary 2ab6a13e5dImport changes for modified filesNo significant changes to the import graph Import changes for all files
|
… -- edit for concision
|
LLM-generated |
There was a problem hiding this comment.
I think here's a better design. May you first prove the following?
theorem Pi.locallyConnectedSpace_of_finite_nonpreconnected
[∀ i, TopologicalSpace (X i)] [∀ i, LocallyConnectedSpace (X i)]
(hfinite : {i | ¬PreconnectedSpace (X i)}.Finite) : LocallyConnectedSpace (∀ i, X i) := sorry
which is saying that if every X i is locally connected and the set of i such that X i is not preconnected is finite, then LocallyConnectedSpace (∀ i, X i). Pi.locallyConnectedSpace_of_finite and Pi.locallyConnectedSpace should then be easy corollaries.
You can then do something similar for locally path connected space.
|
awaiting-author |
|
And maybe if you want you can also prove the following characterization of locally connectedness of the product: |
Is it OK if I do this in a follow-up PR or would you prefer to see it in this PR? I can commit to that as a fast follow. I think the helper lemma deserves its own visibility! Open to your thoughts here :) @CoolRmal |
|
I think it is fine to include these lemmas in this single PR, but maybe you can change the PR description a little bit. |
|
Hello from triage! Can you comment on whether you used AI for this project (and if so, label with PR with LLM-generated)? Thanks! (Per mathlib's AI policy, this is not forbidden in principle, but its usage must be disclosed.) |
|
@grunweg -- correct! I added the LLM-generated tag after pushing the PR to make sure it was tagged correctly. Let me know if there's anything I can do to provide more transparency about my AI usage. |
Thanks. Can you also describe how you used AI in the PR description, below the fold? (This scale has some categories that may be helpful.) |
|
You should remove the awaiting author label if you want another round of review. |
|
-awaiting-author |
CoolRmal
left a comment
There was a problem hiding this comment.
I only give comments for LocallyConnectedSpace, but these should also apply to LocallyPathConnectedSpace.
| /-- The image of a locally connected space under a quotient map (in particular, under an open | ||
| continuous surjection) is locally connected. -/ |
There was a problem hiding this comment.
| /-- The image of a locally connected space under a quotient map (in particular, under an open | |
| continuous surjection) is locally connected. -/ | |
| /-- The image of a locally connected space under a quotient map is locally connected. -/ |
I think there's no need to mention that an open continuous surjection is a quotient map.
| rw [locallyConnectedSpace_iff_connectedComponentIn_open] | ||
| intro F hF y _ | ||
| rw [← hf.isOpen_preimage, isOpen_iff_mem_nhds] | ||
| intro x hx | ||
| have hxF : x ∈ f ⁻¹' F := connectedComponentIn_subset F y hx | ||
| refine Filter.mem_of_superset | ||
| ((hF.preimage hf.continuous).connectedComponentIn.mem_nhds (mem_connectedComponentIn hxF)) | ||
| fun z hz ↦ ?_ | ||
| rw [mem_preimage, connectedComponentIn_eq hx] | ||
| exact connectedComponentIn_mono _ (image_preimage_subset f F) | ||
| (hf.continuous.mapsTo_connectedComponentIn hxF hz) |
There was a problem hiding this comment.
This long proof suggests that we are missing some APIs. Here's a potentially better way to do this:
- Prove this formula for the preimage of a connected component :
f ⁻¹' connectedComponentIn F y = ⋃ x ∈ f ⁻¹' connectedComponentIn F y, connectedComponentIn (f ⁻¹' F) x. - We want to show that
IsOpen (connectedComponentIn F y), and asfis a quotient map it suffices to show thatf ⁻¹' connectedComponentIn F yis open, and by the formula above we know that it is open because it is the union of open sets (where openness ofconnectedComponentIn (f ⁻¹' F) xfollows from the[LocallyConnectedSpace α]). - Moreover, from this proof you can see that we can replace
IsQuotientMap fwithIsCoinducing f(surjection is not needed; see Topology.isQuotientMap_iff).
| · haveI := hloc | ||
| exact Pi.locallyConnectedSpace_of_finite_nonpreconnected hfin |
There was a problem hiding this comment.
| · haveI := hloc | |
| exact Pi.locallyConnectedSpace_of_finite_nonpreconnected hfin | |
| · exact locallyConnectedSpace_of_finite_nonpreconnected hfin |
| rw [nhds_pi, Filter.mem_pi] at hU | ||
| obtain ⟨J, hJ, t, ht, htU⟩ := hU | ||
| classical | ||
| set K := J ∪ {i | ¬PreconnectedSpace (X i)} with hK |
There was a problem hiding this comment.
| set K := J ∪ {i | ¬PreconnectedSpace (X i)} with hK | |
| let K := J ∪ {i | ¬PreconnectedSpace (X i)} |
And then hK is not needed. As K is not really used a lot of times I think it also makes sense to replace K with J ∪ {i | ¬PreconnectedSpace (X i)} in the proof, but this is optional.
| rw [locallyConnectedSpace_iff_connected_subsets] | ||
| intro x U hU |
There was a problem hiding this comment.
| rw [locallyConnectedSpace_iff_connected_subsets] | |
| intro x U hU | |
| refine locallyConnectedSpace_iff_connected_subsets.2 fun x U hU ↦ ?_ |
More concise
| refine ⟨K.pi fun i ↦ connectedComponentIn (t i) (x i), | ||
| set_pi_mem_nhds (hJ.union hfinite) fun i _ ↦ connectedComponentIn_mem_nhds (ht i), ?_, | ||
| fun f hf ↦ htU fun i hiJ ↦ connectedComponentIn_subset _ _ (hf i (mem_union_left _ hiJ))⟩ | ||
| rw [← univ_pi_piecewise_univ] |
There was a problem hiding this comment.
May you move classical just before this line (as this is the lemma that uses classical)?
| suffices himg : Function.eval i '' connectedComponent x = univ by | ||
| exact ⟨himg ▸ isPreconnected_connectedComponent.image _ (continuous_apply i).continuousOn⟩ |
There was a problem hiding this comment.
| suffices himg : Function.eval i '' connectedComponent x = univ by | |
| exact ⟨himg ▸ isPreconnected_connectedComponent.image _ (continuous_apply i).continuousOn⟩ | |
| suffices himg : Function.eval i '' connectedComponent x = univ from | |
| ⟨himg ▸ isPreconnected_connectedComponent.image _ (continuous_apply i).continuousOn⟩ |
by exact is not preferred.
| refine (subset_univ _).antisymm fun z _ ↦ | ||
| ⟨Function.update x i z, htV fun j hj ↦ ?_, by simp⟩ |
There was a problem hiding this comment.
| refine (subset_univ _).antisymm fun z _ ↦ | |
| ⟨Function.update x i z, htV fun j hj ↦ ?_, by simp⟩ | |
| refine (subset_univ _).antisymm fun z _ ↦ ⟨Function.update x i z, htV fun j hj ↦ ?_, by simp⟩ |
No need for a line break like this.
|
awaiting-author |
Add product and pi instances for
LocallyConnectedSpaceandLocallyPathConnectedSpace, together with a full characterization of local (path-)connectedness of pi types:Prod.locallyConnectedSpace/Prod.locallyPathConnectedSpace: binary products.Pi.locallyConnectedSpace_of_finite_nonpreconnected/Pi.locallyPathConnectedSpace_of_finite_nonpathconnected: a product of locally (path-)connected spaces is locally (path-)connected provided all but finitely many factors are preconnected (resp. path-connected). TheFinite ιand all-factors-preconnected (resp. path-connected) instances are corollaries.Pi.locallyConnectedSpace_iff/Pi.locallyPathConnectedSpace_iff: a product is locally (path-)connected iff it is empty or the above conditions hold.Topology.IsQuotientMap.locallyConnectedSpace: quotients of locally connected spaces are locally connected (used for the forward direction via the projections; the analogousIsQuotientMap.locallyPathConnectedSpacealready existed).Follow-up to #40092.
AI disclosure
lake buildof files andlake env leanof some test files (uncommitted)